import request from '@/utils/request.js'
import apis from '@/utils/api'
/**
 * @param {Object} params
 * 公共支出
 */
export function saveExpenditure(params) {
	if(JSON.parse(params.params).id){
		return request.globalRequest(apis.editExpenditure, 'POST', params)
	}else{
		return request.globalRequest(apis.addExpenditure, 'POST', params)
	}    
}

export function getExpenditureList(params){
	return request.globalRequest(apis.getExpenditureList, "POST", params)
}
export function removeExpenditure(params){
	return request.globalRequest(apis.removeExpenditure, "POST", params)
}

export default {
	saveExpenditure,
	getExpenditureList,
	removeExpenditure,
}